//////////////////////////////////////////////////////////////////////
//!\file FileStorageWorkData.hpp
//!\brief Reads out and saves workdata.
//!\author timmsusa@googlemail.com
//////////////////////////////////////////////////////////////////////


#ifndef FILESTORAGEWORKDATA_HPP
#define FILESTORAGEWORKDATA_HPP

#include <QDir>
#include <QString>
#include "FileStorageFlac.hpp"
#include <QVector>
#include <QFileInfo>


class FileStorageWorkData
{
public:
    FileStorageWorkData(const QString& dataPath);
    ~FileStorageWorkData();

    void addStorageData(const FlacTrack& flacTrack);
private:
    void loadStorageData();
    void saveStorageData();

private:
    QString             m_DataPath;
    QFile               m_StorageFile;
    QDataStream         m_OutStream;
    QDataStream         m_InStream;
    QVector< FileStorageFlac > m_FlacStorageList;
    FlacTrack           m_LastFlacTrack;
};

#endif // FILESTORAGEWORKDATA_HPP
